<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.tjsinfo.tjsoa.documentationflow.dangweifawen.vo.TDangweifawenFujian"%>
<%@page import="com.tjsinfo.tjsoa.documentationflow.dangweifawen.vo.TDangweifawenNeirong"%>
<%@page import="com.tjsinfo.tjsoa.common.ToolKit"%>
<%@page import="com.tjsinfo.tjsoa.documentationflow.dangweifawen.vo.TDangweifawenYijian"%>
<%@page import="com.tjsinfo.tjsoa.documentationflow.xingzhengfawen.vo.SubTypeInfo"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
TDangweifawenNeirong dangweifawenNeirong = (TDangweifawenNeirong)request.getAttribute("dangweifawenNeirong");
Long  taskid = (Long)request.getAttribute("taskid");  
List subTypeList = (List)request.getAttribute("subtypelist");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
  	<meta http-equiv="x-ua-compatible" content="ie=7" />
    <base href="<%=basePath%>"/>
    
    <title>发文登记</title>

	<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" />  
<link href="<%=basePath%>style/shoufatable.css" rel="stylesheet" type="text/css" /> 
	<link href="<%=basePath %>ajaxFramework/ext-2.1/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/ext-all.js"></script>
    <script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/source/locale/ext-lang-zh_CN.js"></script>
    <script type="text/javascript" src="<%=basePath %>ajaxFramework/jQuery/jquery.js"></script>
    <script type="text/javascript" src="<%=basePath %>js/common/system/selectusercheck.js"></script>
    <script type="text/javascript" src="<%=basePath %>js/common/system/selectuserradio.js"></script>
    <script type="text/javascript" src="<%=basePath %>js/common/global/validator.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/global/pageControl.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/fileUpload/ajaxfileupload.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/fileUpload/ajaxFileZx.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/init.js"></script>	
	<script type="text/javascript" src="<%=basePath %>js/common/system/selectuserdepartmentbyuserradio.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/system/selectusertreecheck.js"></script>
	<script type="text/javascript" src="<%=basePath %>documentationflow/dangweifawen/js/wenhaotype.js"></script>
       <script type="text/javascript">
		function init(){
			var url = "<%=basePath%>documentationflow/dangweifawen/opendoc.jsp?docname=<%=dangweifawenNeirong.getDocname()%>&WorkMode=0";
		//	var url = "<%=basePath%>documentationflow/dangweifawen/taohongDoc.jsp?docname=<%=dangweifawenNeirong.getDocname()%>&WorkMode=2&state=<%=dangweifawenNeirong.getState() %>";
			with(document.all)
			{
		//	srctext.src = url;
			}
		
		//	initselectusertreecheck();
		}
		$(function(){
			$("#gwlz_title a").get(0).href="javascript:change(1)";
			$("#gwlz_title a").get(1).href="javascript:change(2)";
			$("#gwlz_title a").get(2).href="javascript:change(3)";
			$("#gwlz_title a").get(3).href="javascript:change(4)";
		});
		
		function subtypechange(){
	    		var item = $("select[@name=subtype] option[@selected]").attr("value");
	    		$.get("<%=basePath%>tjsinfo/tjsoa/dangweifawen/shenpi.do?method=getMaxTypeNumber",{wentypeid:item},function(data){
					var obj =  Ext.decode(data);
		    	$("#number").attr("value",obj.number);
		    	$("#haotype").attr("value",obj.haotype);
		});
	    	}
		  
		function change(start){
			if(start == 1)
			{
				$("#li1").addClass("over");
				$("#li2").removeClass();
				$("#li3").removeClass();
				$("#li4").removeClass();
				$("#span1").show();
				$("#span2").hide();
				$("#span3").hide();
				$("#span4").hide();	
			}
			else if(start == 2)
			{
				$("#li2").addClass("over");
				$("#li1").removeClass();
				$("#li3").removeClass();
				$("#li4").removeClass();
				$("#span2").show();
				$("#span1").hide();
				$("#span3").hide();
				$("#span4").hide();	
			}
			else if(start == 3)
			{
				$("#li3").addClass("over");
				$("#li1").removeClass();
				$("#li2").removeClass();
				$("#li4").removeClass();
				$("#span3").show();
				$("#span1").hide();
				$("#span2").hide();
				$("#span4").hide();	
			}
			else if(start == 4)
			{
				$("#li4").addClass("over");
				$("#li1").removeClass();
				$("#li2").removeClass();
				$("#li3").removeClass();
				$("#span4").show();
				$("#span1").hide();
				$("#span2").hide();
				$("#span3").hide();	
			}
			
		}
		function f_submit(){
			if(isnull("#haotype","请选择文种")&&isnull("#number","文号不能为空")&&mustisnumber("#number","文号只能填写数字"))
			{
				Ext.MessageBox.show({
			           title:'消息',
			           msg: '是否执行此操作?',
			           buttons: Ext.MessageBox.YESNO,
			           fn: function(btn){
			           	  if(btn == 'yes'){
			           	  	msg();
					//		srctext.savedoc();
							document.form1.submit();
			           	  }	
			           },
			           icon: Ext.MessageBox.QUESTION
			       });
				 	
			}	
		  }				
		
	</script>	
  </head>
  
  <body  onload="init()">
 <form action="<%=basePath %>tjsinfo/tjsoa/dangweifawen/shenpi.do?method=fawendengji" method="post" name="form1" id="form1">
   <div id="rightindex" style="height: 97%">
   <div id="tabtj">  
      <!--导航开始处-->
      <div id="ttt">
        <div id="gwlz_title">
            <ul>
                <li id="li1"><a href="#"><span>发文承办单</span></a></li>
                <li class="over" id="li2"><a href="#"><span>正文</span></a></li>
                <li id="li3"><a href="#"><span>附件</span></a></li>
                <li  id="li4"><a href="#"><span>办理</span></a></li>
            </ul>
             <div style="text-align: right;padding-right: 10px"><a href="javascript:history.go(-1)"><img src="<%=basePath %>images/fanhui111.gif"/></a>&nbsp;
              <a href="<%=basePath %>tjsinfo/tjsoa/dangweifawen/shenpi.do?method=print&id=<%=dangweifawenNeirong.getId()  %>" target="_blank"><img src="<%=basePath %>images/dayin.gif"/></a></div>    
        </div>
        <div style="overflow-y:scroll; height:96%">
        <div class="swcbdtab" style="display: none;" id="span1">
        
  				 <jsp:include page="./nigaozhi.jsp"></jsp:include>
        
        </div>
        <div class="swcbdtab" id="span2" >
         <table width="97%" border="0" cellpadding="0" cellspacing="0">
         </table>
       	
        <iframe id="srctext" width="100%" height="650px" frameborder=yes HTTP-EQUIV="Content-Type"  wrap="virtual"></iframe>
        </div>
        <div class="swcbdtab" style="display: none;" id="span3">
        	<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:80px">
              <tr>
                <td align="center">
                    <table width="564" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><img src="images/tjfj01.gif" /></td>
                      </tr>
                      <tr>
                        <td><div class="tjfjcontent">
                                <table width="90%" height="90%" border="0" cellspacing="0" cellpadding="0" class="researchtab">
                                
        						<%
                                		Iterator iterator = dangweifawenNeirong.getTDangweifawenFujians().iterator();
                                		while(iterator.hasNext())
                                		{
                                			TDangweifawenFujian dangweifawenFujian = (TDangweifawenFujian)iterator.next();
                                	%>
                                		<a href="<%=basePath %>tjsinfo/tjsoa/dangweifawen/shenpi.do?method=download&id=<%=dangweifawenFujian.getId() %>"><%=dangweifawenFujian.getFujianName() %></a><br/>
                                	<% 		
                                		}
                                	%>
        				         
        				         
                                </table>
                            </div></td>
                      </tr>
                      <tr>
                        <td><img src="images/tjfj03.gif" /></td>
                      </tr>
                    </table>
                </td>
              </tr>
          </table>
        	
        	
        </div>
        <div class="swcbdtab"  id="span4" style="display: none;">
        
        	<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:60px">
              <tr>
                <td align="center">
                	<table width="650" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><img src="images/bl11.gif" /></td>
                  </tr>
                  <tr>
                    <td><div class="blcontent">
                    	<h1>以下内容承办单体现</h1>
                    		<table width="98%" border="0" cellspacing="0" cellpadding="0" class="researchtab">
                             
                              <tr>
                                <th>选择文种</th>
                                <td width="65%" align="left">
                                	
	                                <select name="subtype" id="subtype" onchange="subtypechange()">
	                                	<option value="" >请选择文件种类</option>
	            					<%
	        						Iterator subtypeListIterator = subTypeList.iterator();
	        						while(subtypeListIterator.hasNext())
	        						{
	        						   SubTypeInfo subType = (SubTypeInfo)subtypeListIterator.next(); 		
			        					%>
			        						<option value="<%=subType.getId() %>" ><%=subType.getTypeName()%></option>
			        					<% 		
			        						}
			        					%>
				            		</select>
                                
                                  <td width="15%"><h2>（必填）</h2></td>
                              </tr>                         	
                              <tr>
                                <th>选择文号</th>
                                <td width="65%" align="left"><input  type="text" size="8" name="haotype" id="haotype" value=""/><input  type="text" size="4" name="year" id="year" value="<%=(new Date()).getYear() +1900%>"/>年<input  type="text" size="4"  name="number" id="number" value=""/>号</td>
                                  <td width="15%"><h2>（必填）</h2></td>
                              </tr>
                             <tr>
                                <th>发文日期</th>
                                <td width="65%" align="left"><input name="fawenDate" value="<%=ToolKit.FormatDate(dangweifawenNeirong.getFawendatetime(),"yyyy-MM-dd") %>" onclick="WdatePicker({el:'fawenDate',dateFmt:'yyyy-MM-dd'})"  type="text" id="fawenDate" size="40" readonly="readonly"/></td>
                                  <td width="15%"><h2>（必填）</h2></td>
                              </tr>
                               <tr>
                                <th>份数</th>
                                <td width="65%" align="left"><input name="fenshu" type="text" size="80" /></td>
                                <td>&nbsp;</td>
                              </tr>
                            </table>
                           <!--  <h1>以下内容流程控制</h1>
                            <table width="98%" height="100%" border="0" cellspacing="0" cellpadding="0" class="researchtab">
                             	<tr>
                                    <th>是否通过</th>
                                    <td colspan="2" align="left">
                                    	<input type="radio" name="path"  value="1" checked="checked"/>同意<input type="radio" name="path"  value="0"/>退回<br/>
                                    </td>
                                  </tr>
                             </table> -->
                             <table width="98%" height="100%" border="0" cellspacing="0" cellpadding="0" class="researchtab">
                              <tr>
                                <td><a href="javascript:f_submit()"><img src="images/baocun.gif" /></a>&nbsp;<a href="javascript:history.go(-1)"><img src="images/qx.gif" /></a>
                                </td>
                               </tr>
                            </table>
                    	</div></td>
                  </tr>
                  <tr>
                    <td><img src="images/bl13.gif" /></td>
                  </tr>
                </table>
                
                   
                </td>
              </tr>
          </table>
          
          
        	
        </div>
   	  </div>
   	  </div> 
   </div>
</div>
	  
	<input  type="hidden" name="id" value="<%=dangweifawenNeirong.getId() %>"/>
   	 <input  type="hidden" name="taskid" value="<%=taskid %>"/>
   	 <input  type="hidden" name="flowid" value="<%=dangweifawenNeirong.getFlowid() %>"/>
   	 <input id="state" name="state" value="<%=dangweifawenNeirong.getState()%>" type="hidden"/>
	  <input id="basePath" value="<%=basePath%>" type="hidden"/>
<!--    	  <input id="zhusongid" value="" type="hidden" name="zhusongid"/>
   	  <input id="chaosongid" value="" type="hidden" name="chaosongid"/>
   	  <input id="hegaorenid" value="" type="hidden" name="hegaorenid"/>
   	  <input id="fuherenid" value="" type="hidden" name="fuherenid"/>
   	  <input id="huiqianrenid" value="" type="hidden" name="huiqianrenid"/> -->
   	  <input id="node" value="" type="hidden"/>
</form>
   
  </body>
</html>
